unit uInteresados;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uPai, StdCtrls, DBCtrls, Mask, XPMenu, DB, Buttons, ExtCtrls,
  ComCtrls;

type
  TfInteressados = class(TfPai)
    Label1: TLabel;
    DBEdit1: TDBEdit;
    DBEdit3: TDBEdit;
    Label4: TLabel;
    DBEdit5: TDBEdit;
    Label6: TLabel;
    Label7: TLabel;
    DBEdit6: TDBEdit;
    DBEdit10: TDBEdit;
    Label3: TLabel;
    DBEdit11: TDBEdit;
    Label12: TLabel;
    DBEdit4: TDBEdit;
    Label8: TLabel;
    BitBtn4: TBitBtn;
    GroupBox1: TGroupBox;
    Label2: TLabel;
    dbImovel: TDBComboBox;
    DBEdit2: TDBEdit;
    Label5: TLabel;
    DBComboBox2: TDBComboBox;
    Label11: TLabel;
    DBEdit12: TDBEdit;
    Label16: TLabel;
    DBComboBox1: TDBComboBox;
    Label9: TLabel;
    DBEdit7: TDBEdit;
    Label10: TLabel;
    DBComboBox3: TDBComboBox;
    Label13: TLabel;
    procedure BitBtn4Click(Sender: TObject);
    procedure btnProcurarClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fInteressados: TfInteressados;

implementation

uses UFDM, uProcura;

{$R *.dfm}

procedure TfInteressados.BitBtn4Click(Sender: TObject);
begin
  inherited;
      FProcurar:=TFProcurar.Create(Self,fdm.scds_proc_cep);
      try
      FProcurar.btnCep.Visible:=True;
       if FProcurar.ShowModal=mrOK then
      begin
           fdm.cds_interessadoENDERECO.AsString:=fdm.scds_proc_cepRUA.AsString;
           fdm.cds_interessadoBAIRRO.AsString:=fdm.scds_proc_cepBAIRRO.AsString;
      end;
      finally
       fDM.scds_proc_cep.Close;
       FProcurar.Free;
      end;
   end;

procedure TfInteressados.btnProcurarClick(Sender: TObject);
begin
  inherited;

  FProcurar:=TFProcurar.Create(Self,fdm.Proc_interessados);
  try
   if FProcurar.ShowModal=mrOK then
  begin
   fDM.cds_interessado.Close;
   fDM.cds_interessado.Params[0].AsInteger:=fDM.Proc_interessadosCOD_INTERESSADO.AsInteger;
   fDM.cds_interessado.Open;
 end;
  finally
   fDM.Proc_interessados.Close;
   FProcurar.Free;
  end;

end;

end.
